package com.quanxi.qxaimain.common.util.RestTemplateUtils;

import com.alibaba.fastjson.JSONObject;
import org.junit.Test;
import org.springframework.http.ResponseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author lyx
 * @create 2021/4/22 16:35
 */
public class test {
    @Test
    public void 龙岗门诊病历接口() {
        String url = "http://192.168.66.182:6800/qxzsk/emrsplit/outpatient";
        JSONObject requestBody = new JSONObject();
        List<String> list =new ArrayList<>();
        list.add("fc9f63c69bcc486db6d0fb48da6cf2dc");// select     EOUID from QX_T_EMR_OUTPATIENT

        //参数
        long starttime=System.currentTimeMillis();
        requestBody.put("emrid", list);
        requestBody.put("emrtype", "m11");
        requestBody.put("hospital", "LG2Y");
        ResponseEntity<JSONObject> response = RestTemplateUtils.post(url, requestBody, JSONObject.class);
        long endtime=System.currentTimeMillis();



        System.out.println("====================================================");
        System.out.println((endtime - starttime)+"ms");
        System.out.println(response.getStatusCode());
        System.out.println(response.getBody());
    }
}